TARGET = qmetro
TEMPLATE = app
DESTDIR = bin
VERSION = 0.5.6

!symbian:DEFINES += VERSION=\\\"$$VERSION\\\"
#DEFINES += OPENGL_ENABLE=1

# QTPLUGIN += qjpeg
# include(rc/locale.pri)

win32{
# QT += opengl
 TARGET = qMetro
 QMAKE_LFLAGS += -static-libgcc
 win32-g++:DEFINES += QT_NEEDS_QMAIN
 win32-borland:DEFINES += QT_NEEDS_QMAIN
 RC_FILE = rc/info_win.rc
}

unix:!macx:!symbian {

 # its need only for old SDK
 exists($$QMAKE_INCDIR_QT"/../qmsystem2/qmkeys.h"):!contains(MEEGO_EDITION,harmattan): {
  MEEGO_VERSION_MAJOR     = 1
  MEEGO_VERSION_MINOR     = 2
  MEEGO_VERSION_PATCH     = 0
  MEEGO_EDITION           = harmattan
  DEFINES += MEEGO_EDITION_HARMATTAN
 }

 TARGET = qmetro
 APPNAME = qMetro
 isEmpty(PREFIX):PREFIX = /usr
 BINDIR = $$PREFIX/bin
 DATADIR = $$PREFIX/share

 maemo5{
  #QT += opengl
  BINDIR = /opt/maemo/usr/bin
  DATADIR = /home/user/tmp/$$APPNAME
 }

 contains(MEEGO_EDITION,harmattan){
  BINDIR = /opt/usr/bin
  DATADIR = /home/user/tmp/$$APPNAME
  DEFINES += MEEGO_EDITION_HARMATTAN
 }

 #DEFINES += DATADIR=\\\"$$DATADIR\\\" PKGDATADIR=\\\"$$PKGDATADIR\\\"

 #MAKE INSTALL
 INSTALLS += target desktop icons locale map

 target.path =$$BINDIR

 desktop.path = $$DATADIR/applications
 maemo5: desktop.path = $$PREFIX/share/applications/hildon
 desktop.files = rc/qmetro.desktop
 contains(MEEGO_EDITION,harmattan){
  desktop.path = $$PREFIX/share/applications
  desktop.files = rc/qmetro_meego.desktop
 }

 #maemo5: PREFIX = /opt/usr
 icons.path = $$PREFIX/share/icons
 icons.files += rc/icons/*

 locale.path = $$DATADIR/$$TARGET/locale
 locale.files += bin/locale/*
 map.path = $$DATADIR/$$TARGET/map
 map.files += bin/map/Moscow.pmz

 maemo5{
  locale.path = $$DATADIR/locale
  map.path = $$DATADIR/map
 }
 contains(MEEGO_EDITION,harmattan){
  locale.path = $$DATADIR/locale
  map.path = $$DATADIR/map
 }
}

macx{
 QMAKE_INFO_PLIST = rc/info_mac.plist
 ICON = rc/icon_mac.icns
}

symbian: include(rc/symbian.pri)

#win32{
# include(rc/qml.pri)
# include(rc/qwidget.pri)
#}
#!win32: include(rc/qwidget.pri)

include(rc/qwidget.pri)
#include(rc/qml.pri)
SOURCES += src/mainwindow.cpp \
    src/mapview/mapview.cpp \
    src/mapview/maproute.cpp \
    src/mapview/mapgraphics.cpp \
    src/mapview/mapnode.cpp \
    src/mapview/mapedge.cpp \
    src/mapview/maplayer.cpp \
    src/mapview/mapelement.cpp \
    src/completer.cpp \
    src/settings.cpp \
    src/details.cpp \
    src/ini/inisettings.cpp \
    src/mobileui.cpp \
    src/flickcharm.cpp \
    src/zip/zipglobal.cpp \
    src/zip/zip.cpp \
    src/zip/unzip.cpp

HEADERS  += src/mainwindow.h \
    src/mapview/mapview.h \
    src/mapview/maproute.h \
    src/mapview/mapgraphics.h \
    src/mapview/mapnode.h \
    src/mapview/mapedge.h \
    src/mapview/maplayer.h \
    src/mapview/mapelement.h \
    src/completer.h \
    src/settings.h \
    src/details.h \
    src/ini/inisettings.h \
    src/mobileui.h \
    src/flickcharm.h \
    src/about.h \
    src/zip/zipglobal.h \
    src/zip/zipentry_p.h \
    src/zip/zip_p.h \
    src/zip/zip.h \
    src/zip/unzip.h \
    src/zip/unzip_p.h \
    src/zlib/zlib.h \
    src/zlib/zconf.h \
    src/zlib/zlib.h \
    src/zlib/zconf.h

FORMS    += ui/mainwindow.ui \
            ui/settings.ui \
            ui/details.ui

RESOURCES += rc/resource.qrc

OTHER_FILES += \
    qtc_packaging/debian_harmattan/rules \
    qtc_packaging/debian_harmattan/README \
    qtc_packaging/debian_harmattan/manifest.aegis \
    qtc_packaging/debian_harmattan/copyright \
    qtc_packaging/debian_harmattan/control \
    qtc_packaging/debian_harmattan/compat \
    qtc_packaging/debian_harmattan/changelog \
    qtc_packaging/debian_fremantle/rules \
    qtc_packaging/debian_fremantle/qmetro.links \
    qtc_packaging/debian_fremantle/prerm \
    qtc_packaging/debian_fremantle/postinst \
    qtc_packaging/debian_fremantle/copyright \
    qtc_packaging/debian_fremantle/control \
    qtc_packaging/debian_fremantle/compat \
    qtc_packaging/debian_fremantle/changelog \
    rc/qmetro_meego.desktop \
    rc/qmetro.desktop \
    rc/locale.pri \
    rc/Info.plist \
    rc/icon.rc \
    rc/icon.ico \
    rc/locale/*.ts \
    rc/locale/ru.qm \
    rc/img/zoom-in.png \
    rc/img/zoom-fit-best.png \
    rc/img/system-help.png \
    rc/img/preferences-system-windows-actions.png \
    rc/img/preferences-system.png \
    rc/img/preferences-other.png \
    rc/img/preferences-desktop.png \
    rc/img/general_fullsize.png \
    rc/img/folder-favorites.png \
    rc/img/favorites.png \
    rc/img/edit-find.png \
    rc/img/edit-clear.png \
    rc/img/document-save.png \
    rc/img/document-open.png \
    rc/img/dialog-information.png \
    rc/img/bullet.png \
    rc/img/applications-system.png \
    rc/img/application-exit.png \
    rc/img/zoom-out.png \
    rc/icons/hicolor/64x64/apps/qmetro.png \
    rc/icons/hicolor/80x80/apps/qmetro.png \
    bin/locale/*.lng \
    bin/map/Moscow.pmz \
    rc/menu_wince.res \
    rc/info_win.rc \
    rc/info_mac.plist \
    rc/icon_win.ico \
    rc/img/donate.png
